package com.example.message_wall_spring.mapper;

import com.example.message_wall_spring.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageInfoMapper {
    @Insert("insert into messageinfo values(#{from},#{to},#{say})")
    public void add(MessageInfo messageInfo);

    @Select("select * from messageinfo")
    public List<MessageInfo> getAll();
}
